<!DOCTYPE html>
<html lang="zh" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('设备信息列表')"/>
</head>
<body class="gray-bg">
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="formId">
                <div class="select-list">
                    <ul>
                        <li>
                            <label>设备ID：</label>
                            <input name="sheetId" type="text"/>
                        </li>
                        <li>
                            <label>装置名称：</label>
                            <input name="sheetName" type="text"/>
                        </li>
                        <li>
                            <label>KKS编码：</label>
                            <input name="kksCode" type="text"/>
                        </li>
                        <li>
                            <label>所属专业：</label>
                            <input name="SPECIALTY" type="text"/>
                        </li>
                        <li>
                            <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
                                    class="fa fa-search"></i>&nbsp;搜索</a>
                            <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
                                    class="fa fa-refresh"></i>&nbsp;重置</a>
                        </li>
                    </ul>
                </div>
            </form>
        </div>

        <div class="btn-group-sm" id="toolbar" role="group">
            <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:info:add">
                <i class="fa fa-plus"></i> 添加
            </a>
            <a class="btn btn-primary single disabled" onclick="$.operate.edit()"
               shiro:hasPermission="system:info:edit">
                <i class="fa fa-edit"></i> 修改
            </a>
            <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()"
               shiro:hasPermission="system:info:remove">
                <i class="fa fa-remove"></i> 删除
            </a>
            <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:info:export">
                <i class="fa fa-download"></i> 导出
            </a>
        </div>
        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table"></table>
        </div>
    </div>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
    var editFlag = [[${@permission.hasPermi('system:info:edit')}]];
    var removeFlag = [[${@permission.hasPermi('system:info:remove')}]];
    var prefix = ctx + "system/info";

    $(function () {
        var options = {
            url: prefix + "/list",
            createUrl: prefix + "/add",
            updateUrl: prefix + "/edit/{id}",
            removeUrl: prefix + "/remove",
            exportUrl: prefix + "/export",
            modalName: "设备信息",
            columns: [{
                checkbox: true
            },
                {
                    field: 'ID',
                    title: '主键',
                    visible: false
                },
                {
                    field: 'dataStatusId',
                    title: '数据状态编码'
                },
                {
                    field: 'sheetId',
                    title: '设备ID'
                },
                {
                    field: 'sheetName',
                    title: '装置名称'
                },
                {
                    field: 'typeId',
                    title: '设备类型'
                },
                {
                    field: 'MODEL',
                    title: '规格型号'
                },
                {
                    field: 'kksCode',
                    title: 'KKS编码'
                },
                {
                    field: 'parentEquipId',
                    title: '父设备ID'
                },
                {
                    field: 'parentEquip',
                    title: '父类名称'
                },
                {
                    field: 'functionId',
                    title: '系统ID'
                },
                {
                    field: 'SPECIALTY',
                    title: '所属专业'
                },
                {
                    field: 'equipStatus',
                    title: '设备状态'
                },
                {
                    field: 'SBSL',
                    title: '设备数量'
                },
                {
                    field: 'CYCLE',
                    title: '检修周期'
                },
                {
                    field: 'cycleValue',
                    title: '周期值'
                },
                {
                    field: 'produceDate',
                    title: '制造日期'
                },
                {
                    field: 'outDate',
                    title: '投运日期'
                },
                {
                    field: 'outNum',
                    title: '出厂编号'
                },
                {
                    field: 'installPlace',
                    title: '安装位置'
                },
                {
                    field: 'installOrg',
                    title: '安装单位'
                },
                {
                    field: 'MEMO',
                    title: '其他说明'
                },
                {
                    field: 'patternId',
                    title: '模板编码'
                },
                {
                    field: 'TYPE',
                    title: '设备类型名称'
                },
                {
                    field: 'specialtyName',
                    title: '所属专业'
                },
                {
                    field: 'YBM',
                    title: '原编码'
                },
                {
                    field: 'JZ',
                    title: '机组'
                },
                {
                    field: 'SCCJ',
                    title: '生产厂家'
                },
                {
                    field: 'HTBH',
                    title: '合同编号'
                },
                {
                    field: 'CSM1',
                    title: '参数名1'
                },
                {
                    field: 'CSM2',
                    title: '参数名2'
                },
                {
                    field: 'CSM3',
                    title: '参数名3'
                },
                {
                    field: 'CSM4',
                    title: '参数名4'
                },
                {
                    field: 'CSM5',
                    title: '参数名5'
                },
                {
                    field: 'CSM6',
                    title: '参数名6'
                },
                {
                    field: 'CSM7',
                    title: '参数名7'
                },
                {
                    field: 'CSM8',
                    title: '参数名8'
                },
                {
                    field: 'CSM9',
                    title: '参数名9'
                },
                {
                    field: 'CSM10',
                    title: '参数名10'
                },
                {
                    field: 'CSM11',
                    title: '参数名11'
                },
                {
                    field: 'CSM12',
                    title: '参数名12'
                },
                {
                    field: 'JTCS1',
                    title: '具体参数1'
                },
                {
                    field: 'JTCS2',
                    title: '具体参数2'
                },
                {
                    field: 'JTCS3',
                    title: '具体参数3'
                },
                {
                    field: 'JTCS4',
                    title: '具体参数4'
                },
                {
                    field: 'JTCS5',
                    title: '具体参数5'
                },
                {
                    field: 'JTCS6',
                    title: '具体参数6'
                },
                {
                    field: 'JTCS7',
                    title: '具体参数7'
                },
                {
                    field: 'JTCS8',
                    title: '具体参数8'
                },
                {
                    field: 'JTCS9',
                    title: '具体参数9'
                },
                {
                    field: 'JTCS10',
                    title: '具体参数10'
                },
                {
                    field: 'JTCS11',
                    title: '具体参数11'
                },
                {
                    field: 'JTCS12',
                    title: '具体参数12'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function (value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.ID + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.ID + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
        };
        $.table.init(options);
    });
</script>
</body>
</html>